<template>

    <div>
       <h1>会员详情页面</h1>
       <table border="1">
            <tbody>
                <tr>
                    <th>ID</th>
                    <th>{{data.Id}}</th>
                </tr>
                <tr>
                    <th>会员名称</th>
                    <th>{{data.Name}}</th>
                </tr>
                <tr>
                    <th>会员号</th>
                    <th>{{data.Num}}</th>
                </tr>
                <tr>
                    <th>电话</th>
                    <th>{{data.Phone}}</th>
                </tr>
                <tr>
                    <th>等级</th>
                    <th>{{data.Level}}</th>
                </tr>
                <tr>
                    <th>状态</th>
                    <th>{{data.State}}</th>
                </tr>
                <tr>
                    <th>性别</th>
                    <th>{{data.Sex}}</th>
                </tr>
                <tr>
                    <th>时间</th>
                    <th>{{data.Timess}}</th>
                </tr>
            </tbody>
       </table>
    </div>
</template>

<script setup lang="ts">
import router from '@/router';
import axios from 'axios';
import { ref } from 'vue';
import { onMounted } from 'vue';
import { useRoute } from 'vue-router';

const route=useRoute();

const data=ref({
    "Id": 0,
    "Name": "string",
    "Num": "string",
    "Phone": "string",
    "Level": "string",
    "State": "string",
    "Sex": 0,
    "Timess": "2025-03-24T11:38:09.542Z"
})

onMounted(()=>{
    Getdata();
})

const Getdata=()=>{
    var vid=route.query.Id

    axios.get("https://localhost:7069/api/Member/Detail",{params:{Id:vid}}).then(res=>{
        data.value=res.data;
    })
}


</script>


